package org.domain.sisteste.entity;

// Generated 12/11/2013 11:37:44 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * TbDocumentacao generated by hbm2java
 */
@Entity
@Table(name = "tb_documentacao")
public class Documentacao implements java.io.Serializable {

	private Integer idDocumentacao;
	private Software tbSoftware;
	private String noDocumento;
	private Date dtElaboracao;
	private int nrPaginas;

	public Documentacao() {
	}

	public Documentacao(Software tbSoftware, String noDocumento,
			Date dtElaboracao, int nrPaginas) {
		this.tbSoftware = tbSoftware;
		this.noDocumento = noDocumento;
		this.dtElaboracao = dtElaboracao;
		this.nrPaginas = nrPaginas;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID_Documentacao", unique = true, nullable = false)
	public Integer getIdDocumentacao() {
		return this.idDocumentacao;
	}

	public void setIdDocumentacao(Integer idDocumentacao) {
		this.idDocumentacao = idDocumentacao;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CD_Software", nullable = false)
	@NotNull
	public Software getTbSoftware() {
		return this.tbSoftware;
	}

	public void setTbSoftware(Software tbSoftware) {
		this.tbSoftware = tbSoftware;
	}

	@Column(name = "NO_Documento", nullable = false, length = 30)
	@NotNull
	@Length(max = 30)
	public String getNoDocumento() {
		return this.noDocumento;
	}

	public void setNoDocumento(String noDocumento) {
		this.noDocumento = noDocumento;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DT_Elaboracao", nullable = false, length = 10)
	@NotNull
	public Date getDtElaboracao() {
		return this.dtElaboracao;
	}

	public void setDtElaboracao(Date dtElaboracao) {
		this.dtElaboracao = dtElaboracao;
	}

	@Column(name = "NR_Paginas", nullable = false)
	public int getNrPaginas() {
		return this.nrPaginas;
	}

	public void setNrPaginas(int nrPaginas) {
		this.nrPaginas = nrPaginas;
	}

}
